home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / libz / dysize.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-23  |  484 b   |  27 lines

  1. #
  2.  
  3. /*LINTLIBRARY*/
  4.  
  5. #ifndef lint
  6. #ifndef NOID
  7. static char    sccsid[] = "@(#)dysize.c    3.1";
  8. #endif /* !NOID */
  9. #endif /* !lint */
  10.  
  11. #ifdef BSD_COMPAT
  12.  
  13. #include "tzfile.h"
  14.  
  15. dysize(y)
  16. {
  17.     /*
  18.     ** The 4.[0123]BSD version of dysize behaves as if the return statement
  19.     ** below read
  20.     **    return ((y % 4) == 0) ? DAYS_PER_LYEAR : DAYS_PER_NYEAR;
  21.     ** but since we'd rather be right than (strictly) compatible. . .
  22.     */
  23.     return isleap(y) ? DAYS_PER_LYEAR : DAYS_PER_NYEAR;
  24. }
  25.  
  26. #endif /* BSD_COMPAT */
  27.